package com.test;

import com.wf.captcha.SpecCaptcha;
import org.junit.jupiter.api.Test;

/**
 * ClassName: Captcha
 * Description:
 *
 * @Auther lpl
 * @Create 2024/7/7 16:50
 * @Version 1.0
 */
public class Captcha {
    @Test
    public void test01(){
        // png类型
        SpecCaptcha captcha = new SpecCaptcha(130, 48);
        String code = captcha.text();// 获取验证码的字符
        System.out.println(code);
        String image = captcha.toBase64(); //图片转为字符串
        System.out.println(image);

        char[] chars = captcha.textChar();
        System.out.println(chars);
    }
}
